// TOS-Emulation

#include "windows.h"

#pragma warn -ucp
#pragma warn -sig
//#pragma warn -ccc

#define PATH_MAX 256

#define BOOLEAN BOOL
typedef unsigned char UBYTE;
typedef unsigned short UWORD;
typedef unsigned long ULONG;
typedef signed short SWORD;
#define __PORTAB__

#define FO_READ OF_READ
#define FO_WRITE OF_WRITE
#define FO_RW OF_READWRITE
#define O_RDWR OF_READWRITE

HANDLE Fcreate( char *name, short attr );
HANDLE Fopen( char *name, short attr );
LONG Fseek( long offset, HANDLE hdl, short mode );
LONG Fread( HANDLE hdl, long count, void *buf );
LONG Fwrite( HANDLE hdl, long count, void *buf );
short Fclose( HANDLE hdl );
short Fattrib( char *, int, int );
short Pdomain( short );

#define Mxallox(i,j) Malloc(i)
#if 0
#define Malloc(cb)   (GlobalLock(GlobalAlloc(GHND, (cb))))
#define Mfree(lp)   (GlobalFree(GlobalHandle(lp)))
#else
#define Malloc(cb)   (calloc(1,(cb)))
#define Mfree(lp)   (free(lp))
#endif
//LONG Malloc( LONG len );
//WORD Mfree( void *ptr );


